package acm;

import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc= new Scanner(new InputStreamReader(System.in));
        LinkedList<float[]> list=new LinkedList<>();
        int i=1;
//        while (sc.hasNext()){
        while (i>0){
            list.add(new float[]{sc.nextFloat(),sc.nextFloat()});
            i--;
        }
        for (float[] nums : list) {
            if (nums[0]>=0&&nums[1]>0){
                System.out.println((nums[0]*nums[0]+1)/(nums[0]*nums[0]+2)*nums[1]);
            }else if (nums[0]>0&&nums[1]<=0){
                System.out.println((nums[0]-2)/(nums[1]*nums[1]+1));
            }if (nums[0]<0){
                System.out.println(nums[0]+nums[1]);
            }
        }
    }
}